<template>
    <!--猎头详情  -->
    <div class="content">
         <h1>猎头基本信息</h1>
         <div class="info">
             <p>账号:{{hrInfo.name}}</p>
             <p>公司:{{hrInfo.company_name}}</p>
             <p>联系人:{{hrInfo.contact_person}}</p>
             <p>联系电话:{{hrInfo.contact_phone}}</p>
             <p>联系手机:{{hrInfo.contact_mobile_phone}}</p>
             <p>邮箱:{{hrInfo.contact_email}}</p>
             <p>创建时间:{{hrInfo.create_time}}</p>
             <p>公司简介:{{hrInfo.company_summary}}</p>
             <p>招聘需求:{{hrInfo.hiring_needs}}</p>
         </div>
    
        <h1>猎头关注详情</h1>
        <el-table :data="hrFocusList" style="width: 100%">
            <el-table-column prop="name" label="学员姓名" width="180">
            </el-table-column>
            <el-table-column prop="sex" label="性别" width="180">
            </el-table-column>
            <el-table-column prop="hope_work" label="期望工作">
            </el-table-column>
            <el-table-column prop="now_salary_str" label="现在薪资">
            </el-table-column>
            <el-table-column prop="hope_salary_str" label="期望薪资">
            </el-table-column>
            <el-table-column prop="focus_time" label="关注时间">
            </el-table-column>
            <el-table-column label="操作" width="140">
                <template scope="scope">
                    <el-button @click="goStudentDetail(scope.$index)" type="text" size="small">学员详情</el-button>
                </template>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
import { fetchHrDetail } from "api/remoteSearch"
export default {
    data() {
        return {
            hrInfo: {},
            hrFocusList: []

        }
    },
    mounted() {
        console.log(this.$route)
        let hrId = this.$route.params.id;
        this.fetchHrInfo(hrId);
    },
    methods: {

        fetchHrInfo(hrId) {
            let vm = this;
            fetchHrDetail(hrId)
                .then(res => {
                    if (res.data.status == 'success') {
                        vm.hrInfo = res.data.hr_info;
                        vm.hrFocusList = res.data.hr_focus_list;
                    }
                })
                .catch(err => {

                })
        },
        goStudentDetail(index) {
            let id = this.hrFocusList[index].student_id;
            this.$router.push({ path: "/student/" + id })
        }
    }
}
</script>


<style scoped>
h1{
    font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
    font-size: 18px;
    color: #324057;
    padding-left: 20px;
}
.info{
        padding-left: 40px;
    margin: 20px 0;
}

</style>
